<?php
class Zend_View_Helper_ShowCoreUserIndex {
    public function showCoreUserIndex($view) {

    	$coreUser = $view->CoreUser;
    	$str='';
    	$str .= '</br><a href="'.$view->url(array('controller'=>'User', 'action'=>'add')).'"><input type="submit" name="add" value="Add"  /></a></br>';
        $str .= '<table>';
		$str .= '<tr>';
		$str .= '<th height="30"><input type="checkbox" id="paradigm_all"></th>';
    	$str .= '<th width="200">User Id</th>';
    	$str .= '<th width="200">Role Id</th>';
    	$str .= '<th width="200">User Name</th>';
    	$str .= '<th width="200">Password</th>';
		$str .= '<th width="200">Full Name</th>';
		$str .= '<th width="200">Email</th>';
	//	$str .= '<th>Is Active</th>';
		$str .= '<th width="200">Created Date</th>';
		$str .= '<th width="200">Logged In Date</th>';
	//	$str .= '<th>Is Online</th>';
		$str .= '<th width="400"></th>';
		$str .= '</tr>';

        
        foreach ($coreUser as $coreUser) {
        	$str .= '<tr>'; 	
        	$str .='<td><input type="checkbox" name="chk" value="Yes"></td>';
            $str .='<td>'.$coreUser->user_id.'</td>';
            $str .='<td>'.$coreUser->role_id.'</td>';
            $str .='<td>'.$coreUser->user_name.'</td>';
            $str .='<td>'.$coreUser->password.'</td>';
			 $str .='<td>'.$coreUser->full_name.'</td>';
            $str .='<td>'.$coreUser->email.'</td>';
	//		 $str .='<td>'.$coreUser->is_active.'</td>';
            $str .='<td>'.$coreUser->created_date.'</td>';
			 $str .='<td>'.$coreUser->logged_in_date.'</td>';
    //        $str .='<td>'.$coreUser->is_online.'</td>';
            $str .=	'<td><a href="'.$view->url(array('controller'=>'User', 'action'=>'edit', 'user_id'=>$coreUser->user_id)).'"><input type="submit" name="edit" value="Edit" /></a> ';
            $str .= '<a href="'.$view->url(array('controller'=>'User', 'action'=>'delete','user_id'=>$coreUser->user_id)).'"><input type="submit" name="delete" value="Delete"/></a></td>';
            
            $str .='</tr>';
        }
        
        $str .= '</table>';
        
        return $str; 

    }
}